package com.shuidouxing.filetransferassistant;

import android.app.Application;

import com.lzy.okgo.OkGo;
import com.tencent.mmkv.MMKV;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        builder.readTimeout(10, TimeUnit.SECONDS);      //全局的读取超时时间
        builder.writeTimeout(10, TimeUnit.SECONDS);     //全局的写入超时时间
        builder.connectTimeout(10, TimeUnit.SECONDS);   //全局的连接超时时间
        OkGo.getInstance().init(this).setOkHttpClient(builder.build());

        MMKV.initialize(this);
    }
}
